﻿
namespace BLPicker.Mocks
{
    using System;

    public class BusinessLayerProxyMock : IBusinessLayer<string>
    {

        private readonly IBusinessLayerFactory<IBusinessLayer<string>> _businessLayerFactory;

        public BusinessLayerProxyMock(IBusinessLayerFactory<IBusinessLayer<string>> businessLayerFactory)
        {
            _businessLayerFactory = businessLayerFactory;
        }

        public BusinessOperationResult FirstOperation()
        {
            return _businessLayerFactory.GetBusinessLayer().FirstOperation();
        }

        public BusinessOperationResult SecondOperation<T1, T2>()
        {
            return _businessLayerFactory.GetBusinessLayer().SecondOperation<T1, T2>();
        }


        public event EventHandler FirstEvent
        {
            add { _businessLayerFactory.GetBusinessLayer().FirstEvent += value; }
            remove { _businessLayerFactory.GetBusinessLayer().FirstEvent -= value; }
        }


        public int Index
        {
            get { return _businessLayerFactory.GetBusinessLayer().Index; }
            set { _businessLayerFactory.GetBusinessLayer().Index = value; }
        }
    }
}
